/*
 * Copyright (c) 2022  by Junzhao
 * THIS FILE IS PART OF JAVA-Data-Structures-and-Algorithms PROJECT
 * All Rights Reserved.
 */

package 希尔;


import 工具.Unit;

public class ShellTest {
    public static void main(String[] args) {
//        for (int i : Shell.sortSwitch(new int[]{8,9,1,7,2,3,5,4,6,0})){
//            System.out.print(i + " ");
//        }
//        for (int i : Shell.sortShift(new int[]{8,9,1,7,2,3,5,4,6,0})){
//            System.out.print(i + " ");
//        }

        int[] arr = Unit.randomArr();

        long s = System.currentTimeMillis();
        Shell.sortShift(arr);
//        Shell.sortSwitch(arr);
        long e = System.currentTimeMillis();
        System.out.println(e - s + "ms");// Switch 1149ms 1140ms 1148ms
        // Shift 12ms 10ms 12ms ！！！ 800w 1.6秒

    }
}